cmake_minimum_required(VERSION 3.10)
project(kdldemo)

set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

message("orocos_kdl_DIR = ${orocos_kdl_DIR}")
find_package(orocos_kdl REQUIRED)

message("orocos_kdl_INCLUDE_DIRS = ${orocos_kdl_INCLUDE_DIRS}")
message("orocos_kdl_LIBRARIES = ${orocos_kdl_LIBRARIES}")
include_directories(${orocos_kdl_INCLUDE_DIRS})

add_definitions(-D_USE_MATH_DEFINES)  # To avoid the error: M_PI is undefined. 
add_executable(kdl_KdlDemo KdlDemo.cpp)
target_link_libraries(kdl_KdlDemo ${orocos_kdl_LIBRARIES})